home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 62 / Quick PC 62.iso / I386 / IIS5_01.CAB / IIS_Logon_JScript.asp < prev    next >
Encoding:
Text File  |  1998-05-29  |  1.3 KB  |  51 lines

  1. <%@ LANGUAGE = JScript %>
  2.  
  3. <!*************************
  4. This sample is provided for educational purposes only. It is not intended to be 
  5. used in a production environment, has not been tested in a production environment, 
  6. and Microsoft will not provide technical support for it. 
  7. *************************>
  8.  
  9. <% 
  10.     //Force Authentication if the LOGON_USER Server
  11.     //Variable is blank by sending the Response.Status
  12.     //of 401 Access Denied.
  13.     
  14.     //Finish the Page by issuing a Response.End so that a user
  15.     //cannot cancel through the dialog box.
  16.  
  17.     if (Request.ServerVariables("LOGON_USER") == "") 
  18.     {
  19.         Response.Status = "401 Access Denied";
  20.         Response.End();
  21.     }
  22. %>
  23.  
  24. <HTML>
  25.     <HEAD>
  26.         <TITLE>Login Screens</TITLE>
  27.     </HEAD>
  28.  
  29.     <BODY BGCOLOR="White" TOPMARGIN="10" LEFTMARGIN="10">
  30.  
  31.  
  32.         <!-- Display header. -->
  33.  
  34.         <FONT SIZE="4" FACE="ARIAL, HELVETICA">
  35.         <B>Login Screens</B></FONT><BR>
  36.       
  37.         <HR SIZE="1" COLOR="#000000">
  38.  
  39.     
  40.         <!-- Display LOGON_USER Server variable. -->
  41.  
  42.         You logged in as user:<B>  <%= Request.ServerVariables("LOGON_USER") %></B>
  43.  
  44.  
  45.         <!-- Display AUTH_TYPE Server variable. -->
  46.  
  47.         <P>You were authenticated using:<B>  <%= Request.ServerVariables("AUTH_TYPE") %></B> authentication.</P>
  48.  
  49.     </BODY>
  50. </HTML>
  51.